<html>
<head><meta charset="utf-8"><title>cross compilation · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html">cross compilation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="167923021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/cross%20compilation/near/167923021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Armando Venturi <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html#167923021">(Jun 12 2019 at 07:39)</a>:</h4>
<p>Hi there! I'm trying to create and compile an executable for Illumos. I'm currently working on my mac and so I go with the command "rustup target add" in order to add my target operating system. But now where can I create and find my solaris executable and how can I compile it on my target OS? Thanks everyone in advance.</p>



<a name="167943422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/cross%20compilation/near/167943422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html#167943422">(Jun 12 2019 at 12:57)</a>:</h4>
<p><span class="user-mention" data-user-id="224867">@Armando Venturi</span> there is a blog post describing an analogous process for cross-compiling on Mac targeting Linux here: <a href="http://timryan.org/2018/07/27/cross-compiling-linux-binaries-from-macos.html" target="_blank" title="http://timryan.org/2018/07/27/cross-compiling-linux-binaries-from-macos.html">http://timryan.org/2018/07/27/cross-compiling-linux-binaries-from-macos.html</a></p>



<a name="167943476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/cross%20compilation/near/167943476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html#167943476">(Jun 12 2019 at 12:58)</a>:</h4>
<p>in particular, the analogous command there is <code>cargo build --target=x86_64-unknown-linux-gnu --features 'standalone'</code></p>



<a name="167943490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/cross%20compilation/near/167943490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html#167943490">(Jun 12 2019 at 12:58)</a>:</h4>
<p>so i imagine there's a way to adapt that line to target Illumos</p>



<a name="167943589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/cross%20compilation/near/167943589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html#167943589">(Jun 12 2019 at 12:59)</a>:</h4>
<p>and then the binary would be found somewhere underneath <code>./target/debug/$TARGET/</code>, for appropriate choice of <code>$TARGET</code></p>



<a name="167943656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/cross%20compilation/near/167943656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/cross.20compilation.html#167943656">(Jun 12 2019 at 13:00)</a>:</h4>
<p>but the rest of that post may include important hints to other things you'll need to resolve, like the fact that you'll need a cross-compiling linker</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>